There are many types of computing systems known in the art. These conventional computing systems typically employ memory devices for data storage purposes. Such memory devices include, but are not limited to, non-volatile memory. The phrase “non-volatile memory” as used herein refers to a computer memory that can retain stored information even when powered off. Non-volatile memory generally comprises read-only memory, flash memory, optical disc drives, battery-backed up dynamic random access memory, disk-caches and solid-state-drives, and/or the like.
Data storage is one of the biggest performance bottlenecks on conventional computer systems. Write-Back disk-caching using non-volatile memory can significantly alleviate the performance bottleneck, while at the same time offering power-savings benefits. The phrase “write-back disk cashing” as used herein refers to a process of temporarily storing data in a write back cache (or memory device) of a computing device. Frequently accessed data resides in the write back cache after initial access and subsequent accesses to the same data may be made to the write back cache instead of a hard drive of a computing device.
There are scenarios such as dual-boots, disassociations, crashes and power-failures that can require changing the state of a portion or all of the write back cache in order to maintain data integrity. In particular, these scenarios may require changing the state to invalid or from dirty to clean. The remainder of this description will use the state change of invalidation as the representative state change, but the same method applies for other state changes. Write back cache state modification in non-volatile memory requires marking each non-volatile cacheline invalid in its metadata. The term “cacheline” as used herein refers to a unit (or block) of data that is transferred from a main memory of a computing system to a cache. The term “metadata” as used herein refers to information describing each unit of data. This cache invalidation is not an issue if the non-volatile memory offers fast write operations or the capability to rapidly overwrite metadata. However, writes to non-volatile memories (such as NOR and NAND flash memories) are slow and require writing a new copy of each cacheline in order to invalidate it. Such operations can take a relatively long time. For example, if a power failure occurs, then invalidating a large cache could require the user to wait for a relatively long period of time before the operating system can begin to load. As such, there is a need for an improved system and method for cacheline invalidation.